﻿<ribbon:RibbonWindow xmlns:my="clr-namespace:VisualWip"  x:Class="VisualWip.MainWindow" 
					 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
					 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
					 xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary" 
					 xmlns:visualWip="clr-namespace:VisualWip.PresentationModel;assembly=PresentationModel"
                     xmlns:ViewModels="clr-namespace:VisualWip.PresentationModel.ViewModels;assembly=PresentationModel" Title="Visual WIP"
					 x:Name="RibbonWindow"
                     visualWip:WindowClosingBehavior.Closed="{Binding CloseCommand}"
					  WindowState="Maximized" WindowStyle="SingleBorderWindow" ResizeMode="CanResizeWithGrip" Icon="/Images/sticky_note.png">
    <ribbon:RibbonWindow.Resources>

        <DataTemplate DataType="{x:Type ViewModels:RecentSettingsViewModel}">
            <ribbon:RibbonButton Label="{Binding Label}"
                                 Command="{Binding OpenRecentCommand}"
                                 HorizontalAlignment="Left"
                                 />
        </DataTemplate>

    </ribbon:RibbonWindow.Resources>
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <ribbon:Ribbon x:Name="Ribbon" IsMinimized="True" Panel.ZIndex="99999">
            <ribbon:Ribbon.QuickAccessToolBar>
                <ribbon:RibbonQuickAccessToolBar>
                    <ribbon:RibbonButton x:Name="QARefreshButton"
										 SmallImageSource="/VisualWip;component/Images/112_RefreshArrow_Blue_16x16_72.png"
                						 Label="Refresh"
                                         Command="{Binding RefreshCommand}" KeyTip="R" QuickAccessToolBarId="1" />
                </ribbon:RibbonQuickAccessToolBar>
            </ribbon:Ribbon.QuickAccessToolBar>
            <ribbon:Ribbon.ApplicationMenu>
                <ribbon:RibbonApplicationMenu Label="File" Name="File" KeyTip="F"   >
                    <ribbon:RibbonApplicationMenuItem Header="Open" x:Name="OpenMenuItem" KeyTip="O" Command="{Binding OpenCommand}"/>
                    <ribbon:RibbonApplicationMenuItem Header="Save" x:Name="SaveMenuItem" KeyTip="S" Command="{Binding SaveCommand}" />
                    <ribbon:RibbonApplicationMenuItem Header="Save as" x:Name="SaveAsMenuItem" Command="{Binding SaveAsCommand}" />
                    <ribbon:RibbonApplicationMenuItem Header="Clear" x:Name="ClearMenuItem" Command="{Binding ClearCommand}" />
                    <ribbon:RibbonApplicationMenu.FooterPaneContent>
                        <DockPanel LastChildFill="False">
                            <ribbon:RibbonButton Command="ApplicationCommands.Close"
                                     Label="Exit"
                                     ToolTipTitle="Exit" 
                                     KeyTip="X"
                                     DockPanel.Dock="Right"
                                     Margin="2"
                                     BorderBrush="#B8114EAF" />
                        </DockPanel>
                    </ribbon:RibbonApplicationMenu.FooterPaneContent>
                    <ribbon:RibbonApplicationMenu.AuxiliaryPaneContent>
                        <ribbon:RibbonGallery CanUserFilter="False"
                                  ScrollViewer.VerticalScrollBarVisibility="Auto">
                            <ribbon:RibbonGalleryCategory Header="Most recent" 
                                              Background="Transparent" 
                                              ItemsSource="{Binding RecentSettings}">
                                <ribbon:RibbonGalleryCategory.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <StackPanel Orientation="Vertical" IsItemsHost="True" />
                                    </ItemsPanelTemplate>
                                </ribbon:RibbonGalleryCategory.ItemsPanel>
                            </ribbon:RibbonGalleryCategory>

                        </ribbon:RibbonGallery>
                    </ribbon:RibbonApplicationMenu.AuxiliaryPaneContent>

                </ribbon:RibbonApplicationMenu>
            </ribbon:Ribbon.ApplicationMenu>
            <ribbon:RibbonTab x:Name="Home" Header="Home" Selector.IsSelected="True" KeyTip="H" ItemsSource="{Binding Groups}">
            </ribbon:RibbonTab>
        </ribbon:Ribbon>
        <my:Board Grid.Row="1" DataContext="{Binding Board}" x:Name="myBoard" Panel.ZIndex="-99999"/>
    </Grid>
</ribbon:RibbonWindow>
